<template>
	<div>
		<!-- 生产报表 -->
		<pol-title title="生产报表">
			<template #right>
				<div class="padding-right">
					<el-button icon="Plus" type="primary" class="btn-bg-blue btn-box padding-lr" style="height: 26px; line-height: 26px;">新增</el-button>
				</div>
			</template>
		</pol-title>

		<div class="padding-lr border-solid bg-tm radius-sm main-box-height">
			<!-- 搜索框 -->
			<pol-search :form="searchForm" :schema="schema" @search="clickSearch" class="margin-top"></pol-search>

			<!-- 表格 -->
			<pol-table ref="polTableRef" v-bind="tableOpt" :isPage="true" :isSelection="true" height="calc(100vh - 340px)">
				<template #P_IsReadOnly="{row}">
					<div class="flex align-center justify-center">
						<router-link :to="{ name: 'ProductionReportDetails' }">
							<span class="text-green2 cursor">查看</span>
						</router-link>
						
						<span class="text-green2 cursor margin-left-lg">编辑</span>
						<span class="text-green2 cursor margin-left-lg">删除</span>
					</div>
				</template>

				<template #pageLeft>
					<div class="margin-right-xxl">
						<el-button icon="Upload" type="primary" class="btn-bg-blue btn-box padding-lr-xl" style="height: 40px; line-height: 40px;">导出</el-button>
					</div>
				</template>
			</pol-table>
		</div>
	</div>
</template>

<script setup>
	import { ref } from 'vue';

	const checked1 = ref(null)
	const checked2 = ref(null)
	const checked3 = ref(null)
	const checked4 = ref(null)

	const furnaceNumberRef = ref(null)
	//搜素数据
	const searchForm = ref({
		CardTypeCode: '', //
		CardTypeName: '', //
	});

	//搜素配置
	const schema = ref({
		CardTypeName: {
			label: '关键字',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '选择输入关键字搜索',
			},
			colProps: {
				md: 8,
			},
		}
	});

	function clickSearch() {

	}

	const polTableRef = ref(null); //表格ref
	//表格配置
	const columns = ref([
		{ label: '报表名', key: 'ItemCode', align: 'center' },
		{ label: '创建时间', key: 'ItemName', align: 'center' },
		{ label: '字段数', key: 'ItemValue', align: 'center' },
		{ label: '创建人', key: 'IsDefault', align: 'center' },
		{ label: '使用次数', key: 'P_IsSys', align: 'center' },
		{ label: '操作', key: 'P_IsReadOnly', align: 'center', width: '180', slot: true },
	]);

	//表格配置
	const tableOpt = ref({
		columns: columns.value,
		localData: [{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},

			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},

			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
			{
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			}, {
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			}, {
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			}, {
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			}, {
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			}, {
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			}, {
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			}, {
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			}, {
				ItemCode: '日出坯报表',
				ItemName: '2023-12-15',
				ItemValue: '8',
				IsDefault: '张三',
				P_IsSys: '457',
			},
		]
	});
</script>

<style lang="scss" scoped>

</style>